
setlocal enabledelayedexpansion
@echo off
set input=.
set ouput=D:\2\
echo "input path:" %input%
for /r %input% %%i in (*io.m4s) do (
	set filename=%%~ni
	echo !filename!
	set  dir=%%~pi
	set "dir=!dir:\= !"
	for %%a in (!dir!) do (
		set seconddir=!lastdir!
		set lastdir=%%a
	)
	echo lastdir: !lastdir!
	::echo seconddir: !seconddir!
	set outfile=%ouput%!seconddir!.mp4
	set vpath=%%~pi
	set vname=!vpath!video.m4s
	echo %%i !vname!
	::echo !outfile!
	ffmpeg -i %%i -i !vname! -filter:a "volume=2" -c:v copy -strict experimental !outfile!
)

pause